const api = require('../index')

module.exports = {
  add: (title, cover_img_url, abstract = '', content, music_url = '', music_desc = '', cover_crop = '', privacy = 1) => {
    return api.post('/article/add', { title, cover_img_url, abstract, content, privacy, music_url, music_desc, abstract, cover_crop })
  },
  discovery: (category_id, last_id = 0) => {
    return api.post('/article/discovery', { category_id, last_id })
  },
  detail: (mask_id, uid, password) => {
    return api.post('/article/detail', { mask_id, uid, password })
  },
  update: (mask_id, title, cover_img_url, abstract = '', content, music_url = '', music_desc = '', cover_crop = '') => {
    return api.post('/article/update', { mask_id, title, cover_img_url, abstract, content, music_url, music_desc, abstract, cover_crop })
  },
  forceDelete: (mask_id, uid) => {
    return api.post('/article/forceDelete', { mask_id, uid })
  },
  setting: (mask_id, uid) => {
    return api.post('/article/setting', { mask_id, uid })
  },
  power: (mask_id, privacy, password) => {
    return api.post('/article/privacy', { follomask_id, privacy, passwordw_uid })
  },
  template: (mask_id, theme, text_pos) => {
    return api.post('/article/theme', { mask_id, theme, text_pos })
  },
  privacy: (mask_id, privacy, password) => {
    return api.post('/article/privacy', { mask_id, privacy, password })
  },
  pwdtoken: (password) => {
    return api.post('/article/pwdtoken', { password })
  }

}